package com.chai.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Controller;

public interface UserDao {
    /**
     * 取款操作
     * */
    @Update("update user set money=money-#{money} where id=#{id}")
    void withdrawal(@Param("id") int id,@Param("money") double money);
    /**
     * 存款操作
     * */
    @Update("update user set money=money+#{money} where id=#{id}")
    void deposit(@Param("id") int id,@Param("money") double money);
}
